import request from '@/utils/request'

export function getAppList(data) {
  return request({
    url: `/kd_manage/open_app/list`,
    method: 'post',
    data: data
  })
}

export function addApp(data) {
  return request({
    url: `/kd_manage/open_app/add`,
    method: 'post',
    data: data
  })
}

export function updateApp(openAppId, data) {
  return request({
    url: `/kd_manage/open_app/update?openAppId=` + openAppId,
    method: 'post',
    data: data
  })
}

export function getMchList(data) {
  return request({
    url: `kd_manage/open_app/mch/list`,
    method: 'post',
    data: data
  })
}

export function addMch(data) {
  return request({
    url: `/kd_manage/open_app/mch/add`,
    method: 'post',
    data: data
  })
}

export function updateMch(kdMchId, data) {
  return request({
    url: `/kd_manage/open_app/mch/update?mchId=` + kdMchId,
    method: 'post',
    data: data
  })
}
